<style>
.cart table{
    border:1px solid #cacaca;
    width:100%;
}
.cart td{
    border:1px solid #cacaca;
    padding:4px;
    background-color:#FCF4E3;
    color:#2616FC;
    
}
.cart th{
   background-color:#FF1D00;
   color:#fff; 
}
.cart .qty{
    border:1px solid #cacaca;
    height:25px;
    line-height: 25px;
    margin:2px;
    background-color:#fff;
    padding-left:2px;
}
.cart .capnhatcart{
    cursor:pointer;
}
.thongke .tka{
    border:1px solid #cacaca;
    padding:5px;
    margin:5px;
    background:#D1D3C8;
    color:#082B33;
}
.thongke .tka:hover{
   color:#FF1111;
   text-decoration: none;
}
.cbox_content{
    padding:10px;
}
</style>
<!-- box san pham 3 hang-->
<div class="cbox">
   <div class="cbox_header clearfix">
        <span class="cbox_title block left">
                        Giỏ hàng
        </span>
        <span class="cbox_bg_midd block left"></span>                
        </div>
        <div class="cbox_content clearfix">    
             <form class="cart" method="POST" action="<?php echo base_url();?>cart/update">
             <table>
              <tr>
              <th>id</th>
              <th>Tên sản phẩm</th>
              <th>Số lượng</th>
              <th>Giá</th>
              <th>Xóa</th>
              </tr>
              <?php 
              if($this->cart->contents()){
                foreach ($this->cart->contents() as $item){
                    echo '
                          <tr>
                          <td>'.$item['id'].'</td>
                          <td>'.$item['name'].'</td>
                          <td><input name="'.$item['id'].'" size="2" class="qty" type="text" name="" value="'.$item['qty'].'"/></td>
                          <td>'.$item['price'].' (vnđ)</td>
                          <td><a href="'.base_url().'cart/remov/'.$item['id'].'"><img src="'.base_url().'skin/default/images/xoa.png"/></a></td>
                          </tr>
                    ';
                }
              } 
              ?> 
              </table>
              <div class="thongke">
                  Tổng số:
                  <?php 
                    echo $this->cart->total();
                  ?>
                   (vnđ)
                  <input class="capnhatcart tka" type="submit" value="Cập nhật giỏ hàng"/>
                  <a class="tka" href="<?=base_url()?>">Tiếp tục mua hàng</a>
                  <a class="tka" href="<?=base_url()?>cart/checkout">Thanh toán</a>
              </div>
              
              </form>
  </div>   
</div><!--end box san pham 3 hang-->    
  